﻿define('language',
    ['jquery', 'i18next', 'config', 'utils'],
    function ($, i18n, config, utils) {     
        run = function () {
            $.i18n.init({
                lng: 'en',
                fallbackLng: false,
                ns: { namespaces: ['common'] },
                useCookie : false,
                // cookieName: 'i18next',
                getAsync: false,
                resGetPath: 'default/locales/__lng__/__ns__.json',
                resPostPath: 'default/locales/add/__lng__/__ns__'
            }, function () {
                $(document).i18n();
            });           
        };

        return {
            run: run
        };
    });